<?php
/**
 * Front controller of phpMyMovieBox
 *
 *
 * LICENSE: Some license information
 *
 * phpMMB version: 0.0.1
 *
 * $copyright  2007 SaWey
 * $license    GNU GPL v3.
 * $URL: http://www.sawey.be/phpMyMovieBox $
 * $Revision: 6 $
 * $LastChangedBy: sander.weyens $
 * $Date: 2008-01-14 22:20:38 +0000 (Mon, 14 Jan 2008) $
*/

include('includes/lib_common.php');



//load template
$tpl->define( 
		array( 
				'overall'   	=> "overall.htm",
				'menu'   	=> "menus.htm",
		)
	);
$tpl->assign('TITLE', $config['site_title']);
foreach($lang as $key => $translation)
{
	$tpl->assign($key, $translation);
}




//get page request
$page = $_GET['page'];

//include the requested page
switch($page)
{
	case 'admin':
		include('admin/index.php');
		break;
	
	case 'popup':
		include('popup.php');
		//popup.php has an 'exit' so the parsing of the template below won't happen.
		break;
	
	case 'main':
	default:
		include('main.php');
		break;

}



$tpl->parse('PAGE', "overall");
$tpl->FastPrint("PAGE");
?>